package com.webproject.dao.impl.carManager;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.webproject.core.Page;
import com.webproject.dao.carManager.CarManagerDao;
import com.webproject.entity.carManager.CarPosition;
import com.webproject.entity.carManager.StopCar;
import com.webproject.entity.carManager.StopCarCost;
import com.webproject.entity.carManager.StopCarCostRelation;

public class CarManagerDaoImpl extends SqlMapClientDaoSupport implements CarManagerDao{

	@Override
	public List<CarPosition> queryCarPosition(Page page) {
		// TODO Auto-generated method stub
		return getSqlMapClientTemplate().queryForList("carManager.queryCarPosition", page);
	}

	@Override
	public int queryCarPositionCount(Page page) {
		// TODO Auto-generated method stub
		return (Integer) getSqlMapClientTemplate().queryForObject("carManager.queryCarPositionCount", page);
	}

	@Override
	public void saveCarPosition(CarPosition carPosition) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().insert("carManager.saveCarPosition", carPosition);
	}

	@Override
	public void updateCarPosition(CarPosition carPosition) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().update("carManager.updateCarPosition", carPosition);
	}

	@Override
	public void deleteCarPosition(CarPosition carPosition) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().delete("carManager.deleteCarPosition", carPosition);
	}

	@Override
	public List<StopCar> queryStopCars(Page page) {
		// TODO Auto-generated method stub
		return getSqlMapClientTemplate().queryForList("carManager.queryStopCars", page);
	}

	@Override
	public int queryStopCarsCount(Page page) {
		// TODO Auto-generated method stub
		return (Integer) getSqlMapClientTemplate().queryForObject("carManager.queryStopCarsCount", page);
	}

	@Override
	public void saveStopCar(StopCar stopCar) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().insert("carManager.saveStopCar", stopCar);
	}

	@Override
	public void updateStopCar(StopCar stopCar) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().update("carManager.updateStopCar", stopCar);
	}

	@Override
	public void deleteStopCar(StopCar stopCar) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().delete("carManager.deleteStopCar", stopCar);
	}

	@Override
	public List<StopCarCost> queryStopCarCost(Page page) {
		// TODO Auto-generated method stub
		return getSqlMapClientTemplate().queryForList("carManager.queryStopCarCost", page);
	}

	@Override
	public int queryStopCarCostCount(Page page) {
		// TODO Auto-generated method stub
		return (Integer) getSqlMapClientTemplate().queryForObject("carManager.queryStopCarCostCount", page);
	}

	@Override
	public void saveStopCarCost(StopCarCost carCost) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().insert("carManager.saveStopCarCost", carCost);
	}

	@Override
	public void updateStopCarCost(StopCarCost carCost) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().update("carManager.updateStopCarCost", carCost);
	}

	@Override
	public void deleteStopCarCost(StopCarCost carCost) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().delete("carManager.deleteStopCarCost", carCost);
	}

	@Override
	public void saveStopCarCostRelation(StopCarCostRelation relation) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().insert("carManager.saveStopCarCostRelation", relation);
	}

	@Override
	public void deleteStopCarCostRelation(StopCarCostRelation relation) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().delete("carManager.deleteStopCarCostRelation", relation);
	}

	@Override
	public void updateStopCarCostRelation(StopCarCostRelation relation) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().update("carManager.updateStopCarCostRelation", relation);
	}

	
}
